<h2 class="form-header">
    <?php
    echo CHtml::encode($this->pageTitle);
    ?>
</h2>


<div class="form protected-form">

<?php $form = $this->beginWidget('GxActiveForm', array(
	'id' => 'drill-form',
	'enableAjaxValidation' => false,
));
?>

<?php echo $form->errorSummary($model); ?>

<table class="form-grid">
  <tr>
		<td><?php echo $form->labelEx($model,'name'); ?></td>
		<td><?php echo $form->textField($model, 'name', array('class'=>'input-maxlarge','maxlength' => 40)); ?></td>
  </tr>
  <tr>
		<td><?php echo $form->labelEx($model,'category'); ?></td>
		<td><?php echo Chosen::activeDropDownList($model, 'category', GxHtml::listDataEx(DrillCategory::model()->findAllAttributes(null, true)),array('class'=>'input-maxlarge')); ?></td>
  </tr>
    <tr>
        <td><?php echo $form->labelEx($model,'players'); ?></td>
        <td><?php echo Chosen::activeDropDownList($model, 'players', $model->GetPlayerNumberArray(),array('class'=>'input-maxlarge')); ?></td>
    </tr>

  <tr>
		<td><?php echo $form->labelEx($model,'purpose'); ?></td>
		<td><?php echo $form->textArea($model, 'purpose',array('class'=>'html-editor')); ?></td>
  </tr>
  <tr>
		<td><?php echo $form->labelEx($model,'description'); ?></td>
		<td><?php echo $form->textArea($model, 'description',array('class'=>'html-editor')); ?></td>
  </tr>
  <tr>
		<td><?php echo $form->labelEx($model,'tips'); ?></td>
		<td><?php echo $form->textArea($model, 'tips',array('class'=>'html-editor')); ?></td>
  </tr>
</table>

<?php
    echo GxHtml::submitButton(Yii::t('app', 'Save'),array('id'=>'submit-button','class'=>'form-button'));
    $this->endWidget();
?>
</div><!-- form -->